from model import Model, Dao

class ItemPicture(Model):
    def __init__(self, _dict):
        Model.__init__(self, _dict)
        self.fpath = _dict['fpath']
        #self.created = _dict['created']
        
        # Associate fields
        #self.category = _dict['category']
        self.item = _dict['item']

    def __repr__(self):
        return '<Picture %r>' % (self.name)

class ItemPictureDao(Dao):
    def __init__(self):
        Dao.__init__(self, ItemPicture)
        
        self.collection = 'item_pictures'
        
        # associates { field name : collection name }
        self.ref_collections = {'item':'items'}

       
if __name__ == '__main__':
    # create table
    pass
